<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>轩辕短信平台</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="description" content="Place your description here" />
		<meta name="keywords" content="put, your, keyword, here" />
		<meta name="author" content="cssMoban.com - website templates provider" />
		<link href="style.css" rel="stylesheet" type="text/css" />
		<link href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
		<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="js/common.js" type="text/javascript"></script>
		<script type='text/javascript' src='dwr/engine.js'></script>
		<script type='text/javascript' src='dwr/util.js'></script>
		<script type='text/javascript' src='dwr/interface/sendMessageAction.js'></script>
		<script type="text/javascript" src="js/pageInfo.js"></script>
		<script type="text/javascript">


	$(document).ready(function() {
		$("a.new_window").attr("target", "_blank");
		 executeQuery(sendMessageAction.loadUserByDepartmentId,[4,loadUsers]);
		
		function loadUsers(data){
		     var page = data.pageInfo;
             var datas = data.users;
              if(!page){
             alert("出错了！请重试...");
              }
         initPage(page.totalPage, page.pageIndex, page.pageSize, page.totalRec);  
          $("#table tr").remove();
          var trs = "";
          for(var i=0; i<datas.length; i++){
               var data = datas[i];
               var id = data.id;
               var userName = data.userName;
               var phoneNumber = data.phoneNumber;
               var department = data.departmentName;
               
               var tr = '<tr><td height="18" width="4%" bgcolor="#FFFFFF"><div><div align="center" class="STYLE1">'
					  + '<input type="checkbox" class="STYLE2" value="'+userName+'" name="'+phoneNumber+'" id="asd"/>'
					  + '</div></div></td>'
					  + '<td height="18" bgcolor="#FFFFFF" class="STYLE2">'
					  +	'<div align="center" class="STYLE2 STYLE1">'
					  + userName
					  + '</div></td>'
					  + '<td height="18" bgcolor="#FFFFFF">'
					  + '<div align="center" class="STYLE2 STYLE1">'
					  + department
					  + '</div></td>'
					  + '<td height="18" bgcolor="#FFFFFF">'
					  + '<div align="center" class="STYLE2 STYLE1"><span id="phoneNumber">'
					  + phoneNumber
					  + '</span></div>'
					  + '</td></tr>';
					  trs = trs + tr;
          }
                
          var tr1 = '<tr id="tr"><th height="26" background="images/tab_14.gif" class="STYLE1" width="7%">'
					+'<div align="center" class="STYLE2 STYLE1">选择</div></th>'
					+'<th height="26" background="images/tab_14.gif" class="STYLE1" width="20%">'
					+'<div align="center" class="STYLE2 STYLE1">姓名</div></th><th height="26"'
					+'background="images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">'
					+'所在部门</div></th><th height="26" background="images/tab_14.gif" class="STYLE1">'
					+'<div align="center" class="STYLE2 STYLE1">手机号码</div></th>';
          
            $('#table').append(tr1+trs);
          
		}
		
		
		$("#checkedAll").click(function() { 
              if ($(this).attr("checked") == true) { // 全选 
             $(":checkbox").each(function() { 
               $(this).attr("checked", true); 
              }); 
              } else { // 取消全选 
             $(":checkbox").each(function() { 
              $(this).attr("checked", false); 
              }); 
             } 
          });
	});


		

</script>
		<!--[if lt IE 7]>
<script type="text/javascript" src="js/ie_png.js"></script>
<script type="text/javascript">
	ie_png.fix('.png, .carousel-box .next img, .carousel-box .prev img');
</script>
<link href="ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
	</head>
	<body id="page5">
		<div class="tail-top-left"></div>
		<div class="tail-top">
			<!-- header -->
			<div id="header">
				<div class="row-1">
					<div class="fleft">
						<a href="aboutUsAction"><img src="images/logo.gif" alt="" />
						</a>
					</div>
					<div class="fright">
						<ul>
							<li><a href="indexAction"><b>主页</b></a></li>
					<li><a href="seeUserAction"><b>用户管理</b></a></li>
					<li><a href="sendMessageAction"  class="active"><b>短信平台</b></a></li>
					<li><a href="updateByPersonAction"><b>个人信息管理</b></a></li>
					<li><a href="aboutUsAction"><b>关于我们</b></a></li>
						</ul>
					</div>
				</div>
				
			</div>
			<!-- content -->
			<div id="content">
				<div class="inner_copy">
					More 
					<a href="http://www.cssmoban.com/">Website Templates</a> at
					TemplateMonster.com!
					
				</div>
				<div class="row-1">
					<div class="inside">
						<div class="container">
							<div class="aside">
								<h3>
									发送对象
								</h3>
								<ul>
									<li>
										<img src="images/pic1.gif" alt="" />
										<div class="extra-wrap">
											<span><a href="sendMsgToOperatingAction">运营中心</a>
											</span>
										</div>
									</li>
									
									<li>
										<img src="images/pic3.gif" alt="" />
										<div class="extra-wrap">
											<span><a href="sendMsgToSubOperatingAction?id=1">财务室</a>
											</span>
										</div>
									</li>
									<li>
										<img src="images/pic4.gif" alt="" />
										<div class="extra-wrap">
											<span><a href="sendMsgToSubOperatingAction?id=2">商务室</a>
											</span>
										</div>
									</li>
									<li>
										<img src="images/pic5.gif" alt="" />
										<div class="extra-wrap">
											<span><a href="sendMsgToSubOperatingAction?id=3">物流部</a>
											</span>
										</div>
									</li>
									<li>
										<img src="images/pic2.gif" alt="" />
										<div class="extra-wrap">
											<span><a href="sendMsgToSubOperatingAction?id=4">行政部</a>
											</span>
										</div>
									</li>									
								</ul>
															</div>
							
							<div class="content">
								<br/><br/>
								<div class="txt3">
								
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td height="30">
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="15" height="30">
															<img src="images/tab_03.gif" width="15" height="30" />
														</td>
														<td width="1101" background="images/tab_05.gif">
															<img src="images/311.gif" width="16" height="16" />
															<span class="STYLE4">发送短信</span>
														</td>
														<td width="281" background="images/tab_05.gif">
															<table border="0" align="right" cellpadding="0"
																cellspacing="0">
																<tr>
																	<td width="60">
																		<table width="87%" border="0" cellpadding="0"
																			cellspacing="0" align="">
																			<tr>
																				<td class="STYLE1">
																					<div align="center">
																				<input type="checkbox" id="checkedAll"/>
																					</div>
																				</td>
																				<td class="STYLE1">
																					<div align="center">
																						全选
																					</div>
																				</td>
																			</tr>
																		</table>
																	</td>

																</tr>
															</table>

														</td>
														<td width="14">
															<img src="images/tab_07.gif" width="14" height="30" />
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td>
												<table width="100%" border="0" cellspacing="0"
													cellpadding="0">
													<tr>
														<td width="9" background="images/tab_12.gif">
															&nbsp;
														</td>
														<td bgcolor="#f3ffe3">
															<table width="99%" border="0" align="center" id="table"
																cellpadding="0" cellspacing="1" bgcolor="#c0de98">
																<tr id="tr">
																	<th width="4%" height="26"
																		background="images/tab_14.gif" class="STYLE1">
																		<div align="center" class="STYLE2 STYLE1">
																			选择
																		</div>
																	</th>
																	<th width="8%" height="26"
																		background="images/tab_14.gif" class="STYLE1">
																		<div align="center" class="STYLE2 STYLE1">
																			姓名
																		</div>
																	</th>
																	<th width="5%" height="26"
																		background="images/tab_14.gif" class="STYLE1">
																		<div align="center" class="STYLE2 STYLE1">
																			所在部门
																		</div>
																	</th>
																	<th width="8%" height="26"
																		background="images/tab_14.gif" class="STYLE1">
																		<div align="center" class="STYLE2 STYLE1">
																			手机号码
																		</div>
																	</th>
																</tr>
																
																<!--<tr>
																	<td height="18" bgcolor="#FFFFFF">
																		<div align="center" class="STYLE1">
																			<input name="checkbox" type="checkbox" class="STYLE2"
																				value="checkbox" />
																		</div>
																	</td>
																	<td height="18" bgcolor="#FFFFFF" class="STYLE2">
																		<div align="center" class="STYLE2 STYLE1"></div>
																	</td>
																	<td height="18" bgcolor="#FFFFFF">
																		<div align="center" class="STYLE2 STYLE1"></div>
																	</td>
																	<td height="18" bgcolor="#FFFFFF">
																		<div align="center" class="STYLE2 STYLE1"></div>
																	</td>
																</tr>
															--></table>
														</td>
														<td width="9" background="images/tab_16.gif">
															&nbsp;
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>

								</div>
								
								<div id="allDataDiv">
										<!--上一页，下一页 开始-->
										<table width="100%" class="pagecss">
											<tr>
												<td align="left">
													<span id="AllPage">共几页/几条</span>
													<span id="setupNum">显示每页记录条数</span>
													<select id="setSize"
														onchange="ajaxChangeCount(this.options[this.options.selectedIndex].value)">
													</select>
												</td>
												<td align="right">
													<span id="Flexigrid_Bar"><a href="">上5页</a><span
														class="dan">1</span><a href="">2</a><a href="">3</a><a
														href="">下5页</a> </span>
													<span id="checkPage"><input type="text"
															style="width: 20px;" />&nbsp;页<a href="">GO</a> </span>
												</td>
											</tr>
										</table>
										<!--上一页，下一页 结束-->
									</div>
									
									<div class="wrapper" >
								       	<a href="javascript:sendMsg()" class="link1"><em><b>发送短信</b>
								          	</em></a></div>
									
								
			<!-- 发送信息对话框 -->					
			<div id="sendMsgDialog" style="display: none;" title="发送短信">
				<table border="0" cellspacing="10" >
									
									
									
									<tr>
									   <td class="table_title" valign="top">
											对象：
										</td>
										<td class="table_writing2" id="names">
											
										</td>
									</tr>
									<tr>
									  <td valign="top" width="13%">内容：</td>
									  <td colspan="1"><textarea id="contents" rows="8" cols="50"></textarea></td>
									</tr>
									</table>
			</div>					
								
				<!-- 发送信息对话框结束 -->					
								
								
								
							</div>
							<div class="clear"></div>
						</div>
					</div>
				</div>
				<div class="tail-middle">
			<div class="row-2">
				<div class="inside">
					
					<div class="indent">
						<div class="box1">
							<div class="border-top">
								<div class="border-bot">
									<div class="left-top-corner">
										<div class="right-top-corner">
											<div class="right-bot-corner">
												
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
			</div>
			<!-- footer -->
			<div id="footer">
				<div class="footer">
					版权所有 广东轩辕网络科技股份有限公司 电话：020-85285889 传真：020-85285329
				</div>
			</div>
		</div>
		<script src="js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
		<script type="text/javascript"></script>
	</body>
</html>
